#ifndef DDC_INPUT_H_INCLUDED
#define DDC_INPUT_H_INCLUDED

#include "ddc_scancode.h"

#define DDC_INPUT_MOUSE_LEFT 4
#define DDC_INPUT_MOUSE_MIDDLE 2
#define DDC_INPUT_MOUSE_RIGHT 1

/**
 * DDC_InputManager manage the user input.
 * it MUST be UPDATE when before DDC_GameObject.
 */
class DDC_InputManager {
private:
    static char _keyState;
    static char _mouseButtonState;
    static const uint8_t *_currentKeyStates;

public:
    /**
     * __Update() should not be invoke by developer.
     */
    static void __Update();

    static bool IsMouseDown();
    static bool IsMouseUp();
    static void GetMouseKeyState(char *key);
    static void GetMousePosition(int *x, int *y);
    static bool IsKeyDown();
    static bool IsKeyUp();
    static bool GetKeyState(DDC_Scancode::_DDC_ScancodeEnum scancode);
};

#endif // DDC_INPUT_H_INCLUDED
